{extend name="base" /}
{block name="seo"}
<title>登录 - {$site.name}</title>
<meta name="keywords" content="{$site.keywords}">
<meta name="description" content="{$site.description}">
{/block}
{block name="css"}
<link href="__HOME__/css/user.css" rel="stylesheet" type="text/css">
<link href="__HOME__/css/login.css" rel="stylesheet" type="text/css">
<style>
    .session-form__header {
        margin-top: 40px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        margin-bottom: 24px;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
        -webkit-box-align: end;
        -ms-flex-align: end;
        align-items: flex-end;
    }

.loginapp{

}

 .loginapp + .loginapp {
        margin-left: 48px !important
    }

</style>
{/block}
{block name="body"}
<div class="container">
    <div class="user-login">
        <div class="box fl" >
            {:hooks('adplan.ad_show',['alias'=>'denglu'])}
        </div>
        <div class="login fl">

            <form class="layui-form" name="form1" id='diyform'>
                <div class="session-form__header">
                    <h2 class="session-form__title">
                        <span>登录</span>
                    </h2>
                    <span class="pull-right">没有帐号？使用验证码登录 或 <a href="{:url('user/login/register')}">点此注册</a></span>
                </div>
                <input type="hidden" id="login_type" name="login_type" value="common">

                <div class="layui-form-item">
                    <span><i class="layui-icon layui-icon-username"></i></span>
                    <input type="text" id="object" name="object" placeholder="用户名/邮箱/手机号" class="layui-input"/>
                </div>
                <div class="layui-form-item" id="password-div">
                    <span><i class="layui-icon layui-icon-password"></i></span>
                    <input type="password" id="password" name="password" placeholder="密码" class="layui-input"/>
                </div>

                <div class="layui-form-item">
                    <span><i class="layui-icon layui-icon-vercode"></i></span>
                    <input type="text" id="captcha" name="captcha" placeholder="图形码" class="layui-input"/>
                    <img src="{:url('user/login/captcha')}"
                         onclick="this.src='{:url('user/login/captcha')}?'+Math.random();"
                         style="float:left; height:38px;cursor:pointer;" id="captchaPic" title="点击我更换图片" alt="点击我更换图片">
                </div>
                <div class="layui-form-item" id="code-div" style="display: none">
                    <span><i class="layui-icon layui-icon-vercode"></i></span>
                    <input type="text" id="sms_code" name="sms_code" class="layui-input" placeholder="验证码"/>
                    <button type="button" class="layui-btn layui-btn-normal disabled"
                            style="position: absolute; height: 38px; right: 0; top: 0; width: 106px;background-color: #ffffff; color: #0a0a0a; border: 1px solid #ececec;"
                            id="send_code">发送验证码
                    </button>
                </div>

                <div class="layui-form-item">
                    <span href="javascript:;" class="quick" style="min-width: 100px"><input type="checkbox" name="xxx" lay-skin="switch" ><w style="margin-left:5px;line-height: 38px;height: 30px"> 记住我</w></span>

                    <a class="forget" href="javascript:;" onclick="logintypechange(this)" style="margin-top: 7px">验证码登录</a>

                </div>
                <div class="layui-form-item">
                    <button style="cursor:pointer;" class="layui-btn" lay-submit lay-filter="login" >立即登录</button>
                </div>
                <div class="field text-center" style="text-align: center;margin-bottom: 20px">
                    <a class="forget-password" href="{:url('user/login/forget')}">已有帐号，忘记密码？</a>
                </div>

                <?php  $appLoginArr=sysconfig('applogin.login_types');?>
                {if $appLoginArr}
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px">
                    <legend style="margin: 0 20px 20px 0;
    padding: 0 20px;
    text-align: center;font-size: 15px">其它方式登录</legend>
                    <p class="login-icon" style="text-align: center">
                    {if in_array('qq',$appLoginArr)}
                    <a href="/oauth/qq.html"
                       onclick="layer.msg('正在通过QQ登录', {icon:16, shade: 0.1, time:0})" class="loginapp">
                        <i class="icon-logo-qq iconfont qq" title="使用QQ帐号登录"></i></a>{/if}
                        {if in_array('wechart',$appLoginArr)}
                    <a href="/oauth/wechart.html"
                       onclick="layer.msg('正在使用微信登录', {icon:16, shade: 0.1, time:0})" class="loginapp">
                        <i class="icon-logo_wechat iconfont wechat" title="使用微信登录"></i></a>
                        {/if}  {if in_array('alipay',$appLoginArr)}
                    <a href="/oauth/alipay.html"
                       onclick="layer.msg('正在通过支付宝账号登录', {icon:16, shade: 0.1, time:0})" class="loginapp">
                         <img src="__STATIC__/common/images/app_ico/alipay.png" height="32" style="margin-top:-16px" title="使用支付宝帐号登录"/></a>
                        {/if}  {if in_array('dingtalk',$appLoginArr)}
                    <a href="/oauth/dingtalk.html"
                       onclick="layer.msg('正在通过钉钉登录', {icon:16, shade: 0.1, time:0})" class="loginapp">
                        <i class="dingding icon-logo-dingding iconfont" title="使用钉钉帐号登录"></i></a>
                        {/if}

                    </p>
                </fieldset>

                {/if}


            </form>
        </div>

    </div>
</div>
{/block}
{block name="js"}
<script src="__HOME__/js/user.js"></script>
{/block}